An all flash array (AFA) is often used as a primary storage in these days, and the I/O performance thereof has been increasingly regarded as important. Since the flash memory is expensive, most of the AFAs have a compression/duplication elimination function that suppresses the usage amount of the flash memory.
In the flash memory, when writing data onto a storage area in the volume, in which storage area data written in previous time (called old data) has been stored, the data is not overwritten onto the same storage area, but is added to a new area. Generally, the area storing the old data is not the free area, and is called garbage. The garbage is the unusable and invalid area into which data cannot be written. If the garbage increases, it is the same as wasting the storage area. Accordingly, the storage apparatus performs garbage collection (hereinafter, GC) to ensure a free area when a predetermined amount of the garbage is accumulated. The GC makes the garbage into a reusable area.
The GC is disclosed, for example, in Patent Document 1. The GC copies only valid data in the storage area having accumulated garbage into a new other storage area, and then erases all data in the storage area having the accumulated garbage.